# sprite = codesters.Circle(x, y, diameter, "color")
sun = codesters.Circle(-150, 175, 75, "gold")
# sprite = codesters.Square(x, y, width, "color")
house = codesters.Square(0, -125, 250, "purple")
# sprite = codesters.Triangle(x, y, size, "color")
roof = codesters.Triangle(0, 100, 300, "green")
# sprite = codesters.Rectangle(x, y, width, height, "color")
door = codesters.Rectangle(0, 0, 100, 50, "blue")
try:
tval1 = door.get_y()
tval1a = door.get_x()
except:
tval1 = "DNE"
tval1a = "DNE"
try:
tval2 = door.get_width()
except:
tval2 = "DNE"
try:
tval3 = door.get_height()
except:
tval3 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == -175, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you erase your rectangle named door?")
t1.add_failure(tval1 == 0, "Did you change the y-coordinate the rectangle parameters?")
t1.add_failure(tval1 == 175, "Oops! Try changing the y-coordinate to -175.")
t1.add_failure(tval1a == -175, "Oops! Make sure you change the second parameter to -175!")
t1.add_failure(tval1 < -250 or tval1 > 250, "Oops! Did you move your door off the stage?")
t1.add_creative(tval1 != -175 and tval1a != -175, "That's a good spot for your door also!")
t2 = TestObjective()
t2.add_success(tval2 == 75, "Great job!")
t2.add_failure(tval2 == 100, "Did you change the width?")
t2.add_failure(tval2 == "DNE", "Did you add a rectangle?")
t2.add_creative(tval2 > 75 and tval2 != 100, "That's a wide door!")
t2.add_creative(tval2 < 75 and tval2 != 100, "That's a narrow door!")
t3 = TestObjective()
t3.add_success(tval3 == 150, "Great job!")
t3.add_failure(tval3 == "DNE", "Did you erase your door?")
t3.add_failure(tval3 == 50, "Did you change the height?")
t3.add_creative(tval3 > 150 and tval3 != 50, "That's a tall door!")
t3.add_creative(tval3 < 150 and tval3 != 50, "That's a short door!")
tester = TestManager()
tester.add_test_list([t1, t2, t3])
tester.run_tests()
tester.display_first_feedback()